package com.hopu.oa.service.impl.notemanage;

import com.hopu.oa.dao.notemanage.AoaNoteListDao;
import com.hopu.oa.entity.management.AoaStatusList;
import com.hopu.oa.entity.management.AoaTypeList;
import com.hopu.oa.entity.notemanage.AoaCatalog;
import com.hopu.oa.entity.notemanage.AoaNoteList;
import com.hopu.oa.service.notemanage.NoteManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName: NoteManageServiceImpl
 * @Description:
 * @Date: 2021/11/30 9:36
 */
@Service
public class NoteManageServiceImpl implements NoteManageService {
    @Autowired
    private AoaNoteListDao noteListDao;


    /*
      @Description : 转态
      @Date   :  2021/11/30
      @Param  : []
      @return : java.util.List<com.hopu.oa.entity.management.AoaStatusList>
     */
    @Override
    public List<AoaStatusList> findStatus() {
        return noteListDao.findStatus();
    }

    /*
      @Description : 类型
      @Date   :  2021/11/30
      @Param  : []
      @return : java.util.List<com.hopu.oa.entity.management.AoaTypeList>
     */
    @Override
    public List<AoaTypeList> findType() {
        return noteListDao.findType();
    }

    @Override
    public List<AoaCatalog> findCatalog(Integer userId) {
        return noteListDao.findCatalog(userId);
    }

    /*
      @Description :笔记
      @Date   :  2021/11/30
      @Param  : [userId]
      @return : java.util.List<com.hopu.oa.entity.notemanage.AoaNoteList>
     */
    @Override
    public List<AoaNoteList> findNoteList(Integer userId, Integer catalogId, String baseKey, int index, int size) {
        return noteListDao.findNoteList(userId, catalogId, baseKey, index, size);
    }

    @Override
    public boolean notesomedelete(String[] noteId) {
        return noteListDao.notesomedelete(noteId) > 0;
    }

    @Override
    public boolean noteDeleteById(int noteId) {
        return noteListDao.noteDeleteById(noteId) > 0;
    }
}
